      SUBROUTINE PLIN(NUM,MAX,IN)                                       2581

c	include 'tcommon.for'
	%include tcommon.for

C     ...PUT THINGS IN GALAXY.                                          2582
      DO 100    I=1,NUM                                                 2602
200   IX=AMIN1(RAN(IZZ)*NQUAD+1.,FLOAT(NQUAD))                          2603
      IY=AMIN1(RAN(IZZ)*NQUAD+1.,FLOAT(NQUAD))                          2604
C	write(*,1000) ix,iy,jgal(ix,iy),ibl(ix,iy)
C1000	format(' ',4i10)	
      IF(JGAL(IX,IY).GE.MAX)GO TO 200                                   2605
      IF(IBL(IX,IY).NE.0.AND.IN.EQ.10)GO TO 200                         2606
      JGAL(IX,IY)=JGAL(IX,IY)+IN                                        2607
100   CONTINUE                                                          2608
      RETURN                                                            2609
      END                                                               2610
